package com.hboxs.asl.controller.asl.product;

import com.hboxs.asl.service.TagService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * Controller - 标签
 */
@Controller("aslTagController")
@RequestMapping("/tag")
public class TagControl {

    @Resource(name = "tagServiceImpl")
    private TagService tagService;

    /**
     * 列表
     */
    @RequestMapping(value = "/show", method = RequestMethod.GET)
    public String list(Long tagId, HttpServletRequest request, ModelMap model) {
        model.addAttribute("tag", tagService.find(tagId));
        return "/asl/product/tag-popup";
    }
}
